// 分页
export interface MetaType {
    currentPage: number,
    lastPage: number,
    perSize: number,
    total: number
}

//新建用户
export interface UserBodyType {
    username: string,
    password?: string,
    jurisdiction: string[]
}

// 权限
export interface JurisdictionType {
    id: string,
    name: string,
}

// 分类
export interface DictCategoryType {
    id: string,
    name: string,
    created_at: number,
    updated_at: number,
    key?: string,
    child?: Array<{
        id: string,
        type_id: string,
        name: string,
        key: string
    }>
}

//当前页数
export interface PageAdnSizeType {
    page: number,
    size: number
}

//Modal弹窗标题和是否显示
export interface ModalType {
    visible: boolean,
    title: string
}

// 创建或者编辑字典
export interface DictType {
    type_id: string,
    name: string
}

// 个人信息type
export interface InfoType {
    id: string,
    username: string,
    jurisdictions: Array<{
        id: string,
        name: string,
        english_name: string
    }>,
    created_at: number,
    lasted_at: number,
}

// 文献table数据
export interface LiteratureDataType {
    id: string,
    // 添加唯一标识
    key: string,
    // 封面地址
    cover_url: string,
    cover: {
        id: string,
        path: string,
        type: string
    },
    file: {
        id: string,
        path: string,
        type: string
    },
    // 文件地址
    file_url: string
    // 文獻名字
    name: string,
    // 作者
    author: string,
    // 字典分类
    category_id: string,
    // 出版社
    press: string
    // 文件格式
    file_type: string,
    // 阅读树
    read: number,
    // 推荐
    recommend: number,
    // 是否上架
    grounding: number
    // 编号
    code: string,
    // 阅读树
    visit_num: number,
    dict: {
        type_id: string,
        name: string
    }
}

export interface LiteratureFormType {
    name: string,
    author: string,
    press: string,
    introduce: string,
    code: number,
    cover_id: string,
    file_id: string,
    category_id: string
}

//文章表格数据类型
export interface ArticleDataType {
    id: string,
    // 添加唯一标识
    key: string,
    name: string,
    // 編輯者
    username: string,
    // 内容
    content: string,
    // 封面id
    cover_id: string,
    // 封面详情
    cover: {
        id: string,
        path: string,
        type: string
    },
    // 封面地址
    cover_url: string,
    // 推荐
    recommend: number,
    // 是否上架
    grounding: number,
    // 所属区域id
    region_id: string,
    // 所属区域信息
    region: {
        id: string,
        name: string
    },
    region_name: string,
    // 阅读树
    visit_num: number,
    category_id: string
    dict: {
        type_id: string,
        name: string
    }
}

// 文章修改或者新增body
export interface ArticleFormType {
    name: string,
    username: string,
    content: string,
    cover_id: string,
    category_id: string
}

//区域详情type
export interface RegionType {
    id: string,
    name: string,
    videos: Array<{
        id: string,
        path: string,
        type: string
    }>,
    images: Array<{
        id: string,
        path: string,
        type: string
    }>,
    category_id: string,
    content: string
}

// 分页
export interface MetaType {
    currentPage: number,
    lastPage: number,
    perSize: number,
    total: number
}